package com.shiminghui.StringJoiner;

import java.util.StringJoiner;

public class Demo {
    public static void main(String[] args) {

        int[] arr ={1,2,3,4,5,6};
        StringJoiner stringJoiner = new StringJoiner(" ");
        StringJoiner sj = new StringJoiner(",","[","]");

        for (int i = 0; i < arr.length; i++) {
            sj.add(arr[i]+"");
            stringJoiner.add(arr[i]+"");
        }

        System.out.println(sj.toString());
        System.out.println(stringJoiner.toString());

        StringBuilder sb = new StringBuilder(sj.toString());
        sb.reverse();
        System.out.println(sb.toString());

        System.out.println((int)'是');
    }
}
